package com.ht.pms.core.service.impl;

import java.util.List;

import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ht.pms.core.dao.SalaryUploadFileDao;
import com.ht.pms.core.dto.upload.UpLoadTemp;
import com.ht.pms.core.dto.upload.UploadFile;
import com.ht.pms.core.service.SalaryUploadFileService;

@Service
public class SalaryUploadFileServiceImpl implements SalaryUploadFileService {
	private static final Logger LOGGER = LoggerFactory.getLogger(SalaryUploadFileServiceImpl.class);
	

	@Autowired
	private SalaryUploadFileDao salaryUploadFileDao;

	@Override
	public UpLoadTemp getUploadTempByBatchCode(String batchCode) {
		if(StringUtils.isEmpty(batchCode)) {
			return null;
		}
		return salaryUploadFileDao.selectUploadTempByBatchCode(batchCode);
	}

	@Override
	public UploadFile getUploadFileByFileId(Integer fileId) {
		
		return salaryUploadFileDao.selectUploadFileByFileId(fileId);
	}

	@Override
	public List<UploadFile> getUploadFileByBatchCode(String batchCode) {
		return salaryUploadFileDao.selectUploadFileByBatchCode(batchCode);
	}

}
